import java.awt.*;
import javax.swing.*;

public class ColoredRectangle {

	//attributes
	private Point upperLeftPoint; 
	private int length;
	private int width;
	private Color color;
	
	//constructors
	public ColoredRectangle(){
		upperLeftPoint=new Point(0,0);
		length=0;
		width=0;
		setColor(Color.BLUE);
	}
	public ColoredRectangle(int x, int y, int aLength, int aWidth){
		upperLeftPoint=new Point(x,y);
		length=aLength;
		width=aWidth;
		setColor(Color.BLUE);
		
	}
	//accessors
	public Point getPoint(){
		return upperLeftPoint;
	}
	public double getLength(){
		return length;
	}
	public double getWidth(){
		return width;
	}
	public Color getColor(){
		return color;
	}
	
	//mutators
	public void setPoint(Point aPoint){
		upperLeftPoint=aPoint;
	}
	public void setLength(int aLength){
		length=aLength;
	}
	public void setWidth(int aWidth){
		width=aWidth;
	}
	public void setColor(Color aColor){
		color=aColor;
	}
	
	public void drawGraphics(Graphics g){

		int x = (int)upperLeftPoint.getX();
		int y = (int)upperLeftPoint.getY();
		g.setColor(Color.BLUE);
		g.fillRect(x, y, width, length);

	}

}
